<html><head><title>KeyboardPushed</title></head>
<body bgcolor="#FFFFDF" link="#009999" vlink="#006666" alink="#006666">
<font face="Arial" size="2"><p align="center"><b><font size="4">KeyboardPushed()</font></b></p>
<p><b>Syntax</b></p><blockquote>
Result = <font color="#006666"><b>KeyboardPushed</b></font>(KeyID)</blockquote>

</blockquote>
<b>Description</b><br><blockquote>

Checks if the specified key is pressed. Any number of keys may be pressed at the same time. The function 
<a href="examinekeyboard.html">ExamineKeyboard()</a> must be called before this function in order to update the keyboard 
state. The keyboard behavior can be changed with <a href="keyboardmode.html">KeyboardMode()</a>. 
<br>
<br>
To check if a specified key has been pushed and released, see <a href="keyboardreleased.html">KeyboardReleased()</a>. 

</blockquote><p><b>Parameters</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>KeyID</i></td>
<td width="90%"> 
The identifier of the key to be checked. List of available keys: 
<pre><font face="Courier New, Courier, mono"size="2">  <font color="#924B72">#PB_Key_All</font>   ; All keys are tested. Very useful for any key checks.

  <font color="#924B72">#PB_Key_1</font>
  <font color="#924B72">#PB_Key_2</font>
  <font color="#924B72">#PB_Key_3</font>
  <font color="#924B72">#PB_Key_4</font>
  <font color="#924B72">#PB_Key_5</font>
  <font color="#924B72">#PB_Key_6</font>
  <font color="#924B72">#PB_Key_7</font>
  <font color="#924B72">#PB_Key_8</font>
  <font color="#924B72">#PB_Key_9</font>
  <font color="#924B72">#PB_Key_0</font>

  <font color="#924B72">#PB_Key_A</font>
  <font color="#924B72">#PB_Key_B</font>
  <font color="#924B72">#PB_Key_C</font>
  <font color="#924B72">#PB_Key_D</font>
  <font color="#924B72">#PB_Key_E</font>
  <font color="#924B72">#PB_Key_F</font>
  <font color="#924B72">#PB_Key_G</font>
  <font color="#924B72">#PB_Key_H</font>
  <font color="#924B72">#PB_Key_I</font>
  <font color="#924B72">#PB_Key_J</font>
  <font color="#924B72">#PB_Key_K</font>
  <font color="#924B72">#PB_Key_L</font>
  <font color="#924B72">#PB_Key_M</font>
  <font color="#924B72">#PB_Key_N</font>
  <font color="#924B72">#PB_Key_O</font>
  <font color="#924B72">#PB_Key_P</font>
  <font color="#924B72">#PB_Key_Q</font>
  <font color="#924B72">#PB_Key_R</font>
  <font color="#924B72">#PB_Key_S</font>
  <font color="#924B72">#PB_Key_T</font>
  <font color="#924B72">#PB_Key_U</font>
  <font color="#924B72">#PB_Key_V</font>
  <font color="#924B72">#PB_Key_W</font>
  <font color="#924B72">#PB_Key_X</font>
  <font color="#924B72">#PB_Key_Y</font>
  <font color="#924B72">#PB_Key_Z</font>

  <font color="#924B72">#PB_Key_Escape</font>
  <font color="#924B72">#PB_Key_Minus</font>
  <font color="#924B72">#PB_Key_Equals</font>
  <font color="#924B72">#PB_Key_Back</font>
  <font color="#924B72">#PB_Key_Tab</font>
  <font color="#924B72">#PB_Key_LeftBracket</font>
  <font color="#924B72">#PB_Key_RightBracket</font>
  <font color="#924B72">#PB_Key_Return</font>
  <font color="#924B72">#PB_Key_LeftControl</font>
  <font color="#924B72">#PB_Key_SemiColon</font>
  <font color="#924B72">#PB_Key_Apostrophe</font>
  <font color="#924B72">#PB_Key_Grave</font>
  <font color="#924B72">#PB_Key_LeftShift</font>
  <font color="#924B72">#PB_Key_BackSlash</font>
  <font color="#924B72">#PB_Key_Comma</font>
  <font color="#924B72">#PB_Key_Period</font>
  <font color="#924B72">#PB_Key_Slash</font>
  <font color="#924B72">#PB_Key_RightShift</font>
  <font color="#924B72">#PB_Key_Multiply</font>
  <font color="#924B72">#PB_Key_LeftAlt</font>
  <font color="#924B72">#PB_Key_Space</font>
  <font color="#924B72">#PB_Key_Capital</font>
  <font color="#924B72">#PB_Key_F1</font>
  <font color="#924B72">#PB_Key_F2</font>
  <font color="#924B72">#PB_Key_F3</font>
  <font color="#924B72">#PB_Key_F4</font>
  <font color="#924B72">#PB_Key_F5</font>
  <font color="#924B72">#PB_Key_F6</font>
  <font color="#924B72">#PB_Key_F7</font>
  <font color="#924B72">#PB_Key_F8</font>
  <font color="#924B72">#PB_Key_F9</font>
  <font color="#924B72">#PB_Key_F10</font>
  <font color="#924B72">#PB_Key_F11</font>
  <font color="#924B72">#PB_Key_F12</font>
  <font color="#924B72">#PB_Key_NumLock</font>
  <font color="#924B72">#PB_Key_Scroll</font>
  <font color="#924B72">#PB_Key_Pad0</font>
  <font color="#924B72">#PB_Key_Pad1</font>
  <font color="#924B72">#PB_Key_Pad2</font>
  <font color="#924B72">#PB_Key_Pad3</font>
  <font color="#924B72">#PB_Key_Pad4</font>
  <font color="#924B72">#PB_Key_Pad5</font>
  <font color="#924B72">#PB_Key_Pad6</font>
  <font color="#924B72">#PB_Key_Pad7</font>
  <font color="#924B72">#PB_Key_Pad8</font>
  <font color="#924B72">#PB_Key_Pad9</font>
  <font color="#924B72">#PB_Key_Add</font>
  <font color="#924B72">#PB_Key_Subtract</font>
  <font color="#924B72">#PB_Key_Decimal</font>
  <font color="#924B72">#PB_Key_PadEnter</font>
  <font color="#924B72">#PB_Key_RightControl</font>
  <font color="#924B72">#PB_Key_PadComma</font>
  <font color="#924B72">#PB_Key_Divide</font>
  <font color="#924B72">#PB_Key_RightAlt</font>
  <font color="#924B72">#PB_Key_Pause</font>
  <font color="#924B72">#PB_Key_Home</font>
  <font color="#924B72">#PB_Key_Up</font>
  <font color="#924B72">#PB_Key_Down</font>
  <font color="#924B72">#PB_Key_Left</font>
  <font color="#924B72">#PB_Key_Right</font>
  <font color="#924B72">#PB_Key_End</font>
  <font color="#924B72">#PB_Key_PageUp</font>
  <font color="#924B72">#PB_Key_PageDown</font>
  <font color="#924B72">#PB_Key_Insert</font>
  <font color="#924B72">#PB_Key_Delete</font>
</font></pre>

</td></tr>
</table>
</blockquote><p><b>Return value</b></p><blockquote>

Nonzero if the specified key is pushed, zero otherwise. 

</blockquote><p><b>Example</b></p><blockquote>

<pre><font face="Courier New, Courier, mono"size="2">  <b><font color="#006666">If</font></b> <font color="#006666">InitSprite</font>() <b><font color="#006666">And</font></b> <font color="#006666">InitKeyboard</font>() <b><font color="#006666">And</font></b> <font color="#006666">OpenScreen</font>(800,600,16,"")
    <b><font color="#006666">Repeat</font></b>
<font color="#006666">      FlipBuffers</font>()

      <b><font color="#006666">If</font></b> <font color="#006666">StartDrawing</font>(<font color="#006666">ScreenOutput</font>())
<font color="#006666">        DrawText</font>(0, 0, "Press ESC to quit")
<font color="#006666">        StopDrawing</font>()
      <b><font color="#006666">EndIf</font></b>

<font color="#006666">      ExamineKeyboard</font>()
      <b><font color="#006666">If</font></b> <font color="#006666">KeyboardPushed</font>(<font color="#924B72">#PB_Key_Escape</font>)   <font color="#006666">; press Esc to quit</font>
        <b><font color="#006666">End</font></b>
      <b><font color="#006666">EndIf</font></b>
    <b><font color="#006666">ForEver</font></b>
  <b><font color="#006666">EndIf</font></b>
</font></pre>

</blockquote><p><b>See Also</b></p><blockquote>

<a href="examinekeyboard.html">ExamineKeyboard()</a>, <a href="keyboardreleased.html">KeyboardReleased()</a> 

</Blockquote><p><b>Supported OS </b><Blockquote>All</Blockquote></p><center><- <a href=keyboardmode.html>KeyboardMode()</a> - <a href=index.html>Keyboard Index</a> - <a href=keyboardreleased.html>KeyboardReleased()</a> ->

</body></html>